package stan;

public class ConnectionStateConnected extends ConnectionState {

    public ConnectionStateConnected(Connection connection) {
        super(connection);
    }

    public void connect() {
        throw new IllegalStateException("Already connected");
    }

    public void disconnect() {

        connection.setState(connection.DISCONNECTED);
    }

    public boolean isConnected() {
        return true;
    }

}
